import React from 'react'
import { BrowserRouter, Routes, Route } from "react-router-dom"
import List from './pages/List'
import Category from './pages/Category'

//进行判断，当前React应用是独立运行，还是通过主应用加载
const BASE_NAME = window.__POWERED_BY_QIANKUN__ ? "/gen":""

//react/category
export default function App() {
  return (
    <BrowserRouter basename={BASE_NAME}>
      <Routes>
        <Route path='/shop' element={<List/>}></Route>
        <Route path='/apply/charge' element={<Category/>}></Route>
      </Routes>
    </BrowserRouter>
  )
}
